<include file="Public:system_header" title="OA平台管理"/>
     <div class="module_public_main">
        <table id="table_id">
          <tr>
            <td colspan="4"><font color=red>系统说明:（本系统为自主开发产品,最终版权归个人所有,可供公司/个人内部使用,禁止用于商业用途,可进行二次开发）</font></td>
          </tr>
          <tr>
            <td width="20%" align="right">OA当前版本:</td>
            <td colspan="3"><b style="color:red;">MaoMao v2.0</b></td>
          </tr>
          <tr>
            <td width="20%" align="right">(开发阶段所用)-PHP版本:</td>
            <td width="40%"><b style="color:green">5.2.6</b></td>
            <td width="20%" align="right">(您当前所使用)-PHP版本:</td>
            <td width="40%"><b style="color:green"><{$PHPversion}></b></td>
          </tr>
          <tr>
            <td width="20%" align="right">(开发阶段所用)-MYSQL版本:</td>
            <td><b style="color:green">5.0.51b-community-nt</b></td>
            <td width="20%" align="right">(您当前所使用)-MYSQL版本:</td>
            <td><b style="color:green"><{$MYSQLversion}></b></td>
          </tr>
          <tr style="background:#F0F0F0;">
            <td colspan="4">OA-基本设置:<font color=red>&nbsp;&nbsp;（注：欢迎使用2.0）</font></td>
          </tr>
          <form action="__URL__/do_config" method="post">
          <input type="hidden" name="c_id" value="<{$config_info.c_id}>" />
          <tr>   
            <td width="12%" align="right">是否开启OA平台:</td>
            <if condition="$config_info.c_switch eq '1'">
            <td colspan="3"><input type="radio" name="c_switch" checked="" value="1"/><font color=green>开启</font>&nbsp;&nbsp;<input type="radio" name="c_switch" value="0"/><font color=red>关闭</font></td>
            <else />
            <td colspan="3"><input type="radio" name="c_switch" value="1"/><font color=green>开启</font>&nbsp;&nbsp;<input type="radio" name="c_switch"  checked="" value="0"/><font color=red>关闭</font></td>
            </if>
          </tr>
          <tr>
            <td width="12%" align="right">是否限制登陆时段:</td>
            <if condition="$config_info.c_is_loginTime eq '1'">
            <td colspan="3"><input type="radio" name="c_is_loginTime" checked="" value="1"/><font color=green>限制</font>&nbsp;&nbsp;<input type="radio" name="c_is_loginTime"  value="0"/><font color=red>自由</font>&nbsp;【限制时段:<{$config_info.c_logTime}>】</td>
            <else />
            <td colspan="3"><input type="radio" name="c_is_loginTime"  value="1"/><font color=green>限制</font>&nbsp;&nbsp;<input type="radio" name="c_is_loginTime"  checked=""  value="0"/><font color=red>自由</font></td>
            </if>
          </tr>
          <tr id="xianzhi_time" style="display:none">
            <td>&nbsp;</td>
            <td colspan="3" style="background:#EEEEEE;">
              <input type="text" name="c_logTime" class="_input" value="<{$config_info.c_logTime}>"/>&nbsp;<font color=red>（格式->例如:22:00-08:00 请按照此格式行进限制时间的输入)</font>
            </td>
          </tr>
          <tr>
            <td width="12%" align="right">是否开启登陆报警:</td>
            <if condition="$config_info.c_is_loginWarning eq '1'">
            <td colspan="3"><input type="radio" name="c_is_loginWarning" checked="" value="1"/><font color=green>开启</font>&nbsp;&nbsp;<input type="radio" name="c_is_loginWarning" value="0"/><font color=red>关闭</font>&nbsp;【报警次数:<{$config_info.c_warningNum}>】</td>
            <else />
            <td colspan="3"><input type="radio" name="c_is_loginWarning"  value="1"/><font color=green>开启</font>&nbsp;&nbsp;<input type="radio" name="c_is_loginWarning" checked=""  value="0"/><font color=red>关闭</font></td>
            </if>
          </tr>
 		  <tr id="warning_num" style="display:none">
            <td>&nbsp;</td>
            <td colspan="3" style="background:#EEEEEE;">
              <input type="text" name="c_warningNum" class="_input" value="<{$config_info.c_warningNum}>"/>&nbsp;<font color=red>次后,将账号锁定</font>
            </td>
          </tr>
           <tr>
            <td width="12%" align="right">是否开启日志记录:</td>
            <if condition="$config_info.c_is_log eq '1'">
            <td colspan="3"><input type="radio" name="c_is_log" checked="" value="1"/><font color=green>开启</font>&nbsp;&nbsp;<input type="radio" name="c_is_log" value="0"/><font color=red>关闭</font></td>
            <else />
            <td colspan="3"><input type="radio" name="c_is_log" value="1"/><font color=green>开启</font>&nbsp;&nbsp;<input type="radio" name="c_is_log" checked="" value="0"/><font color=red>关闭</font></td>
            </if>
          </tr>
           <tr>
             <td>&nbsp;</td>
             <td colspan="3"><input type="submit" value="更新配置" class="_button"/></td>
           </tr>
          </form>
          <tr style="background:#F0F0F0;">
            <td colspan="2">OA-公司同事/员工快速查询簿&nbsp;
            <select id="query_book" class="_input">
               <option disabled="disabled" selected="selected">--请选择要添加的人员--</option>
               <volist name="e_info" id="v">
               <option value="<{$v.u_name}>|<{$v.d_name}>|<{$v.p_name}>|<{$v.u_phone}>"><{$v.u_name}></option>
               </volist>
            </select>
            <b style="color:red;cursor:pointer;" id="add_info">【加入快速查询簿】</b></td>
          </tr>
          <tr>
            <td width="8%" align="right"><b>姓名</b></td>
            <td width="20%" align="right"><b>所在部门</b></td>
            <td width="20%" align="right"><b>职位</b></td>
            <td width="20%" align="right"><b>电话</b></td>
           </tr>
           <volist name="q_info" id="v">
             <tr>
               <td align="right"><{$v.q_name}></td>
               <td align="right"><{$v.q_department}></td>
               <td align="right"><{$v.q_position}></td>
               <td align="right"><{$v.q_phone}></td>
             </tr>
           </volist>
        </table>
     </div>
     <script type="text/javascript">
		$("#add_info").click(function(){
			var add_name = $("#query_book").val();
			var arr = add_name.split("|");
			
			$.get("__URL__/add_quickBooks",{
				q_name:arr[0],
				q_department:arr[1],
				q_position:arr[2],
				q_phone:arr[3]	
			},function(data){
			  	if(data==3){
					alert("对不起,该用户已经添加进快速查询通讯簿了");
				}else if(data==2){
					alert("对不起,添加失败");
				}else{
					$("#table_id").append(data);				
				}
			});
	    });
		
		//配置的简单验证
		$("input[name='c_is_loginTime']").click(function(){
			 if(this.value=="1"){
				$("#xianzhi_time").fadeIn(800);  
			 }else{
				$("#xianzhi_time").hide();
			 }
		});
		
		$("input[name='c_is_loginWarning']").click(function(){
			 if(this.value=="1"){
				$("#warning_num").fadeIn(800);  
			 }else{
				$("#warning_num").hide();
			 }
		});
	 </script>
<include file="Public:system_footer" />